package com.smartpro.mis;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;

import javax.servlet.MultipartConfigElement;

/**
 * SpringBoot方式启动类
 *
 * @author smartpro
 * @Date 2017/5/21 12:06
 */
@SpringBootApplication
public class SupermisApplication {

    private final static Logger logger = LoggerFactory.getLogger(SupermisApplication.class);
    @Bean
    MultipartConfigElement multipartConfigElement() {
        MultipartConfigFactory factory = new MultipartConfigFactory();
        factory.setLocation(System.getProperty("user.dir"));
        return factory.createMultipartConfig();
    }

    public static void main(String[] args) {
        SpringApplication.run(SupermisApplication.class, args);
        logger.info("SupermisApplication is success!");
    }
}
